package com.cyclecoder.prototypedemo;

import java.util.ArrayList;
import java.util.List;

/**
 * @author by zhanglei
 * @Date 2021/8/3
 */
public class ProtoTypeTest implements Cloneable{
    private List<String> protyName;
    public ProtoTypeTest(){
        this.protyName = new ArrayList<String>();
    }
    public ProtoTypeTest(List<String> protyName){
        this.protyName = protyName;
    }
    @Override
    protected ProtoTypeTest clone() throws CloneNotSupportedException {
        return (ProtoTypeTest) super.clone();
    }

    public List<String> getContents(){
        return protyName;
    }

    public void addName(){
        protyName.clear();
        protyName.add("壮志饥餐胡虏肉");
        protyName.add("笑谈渴饮匈奴血");
    }
}
